/**
 * Created by imac13 on 19/1/5.
 */
import React,{ Component } from 'react';
import { Card,Button,message } from 'antd';
import './../ui.less'

class Messages extends Component {
    openMessage = (type) => {
        message[type]('恭喜你，购买成功！');
    };
    render(){
        return(
            <div>
                <Card title="Message全局提醒框" className="card-wrapper">
                    <Button type="primary" onClick={()=>this.openMessage('success')}>Success</Button>
                    <Button type="primary" onClick={()=>this.openMessage('error')}>Error</Button>
                    <Button type="primary" onClick={()=>this.openMessage('info')}>Info</Button>
                    <Button type="primary" onClick={()=>this.openMessage('warning')}>Warning</Button>
                    <Button type="primary" onClick={()=>this.openMessage('loading')}>Loading</Button>
                </Card>

            </div>
        )
    }
}

export default Messages;